home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
shrlk201.zip
/
_SETUP.1
/
Main.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1997-07-22
|
2KB
|
54 lines
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "Main.h"
//---------------------------------------------------------------------------
#pragma link "sampreg"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::txtUserNameChange(TObject *Sender)
{
txtCodeOut->Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::txtPrivateKeyChange(TObject *Sender)
{
txtCodeOut->Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::rgUnlockTypeClick(TObject *Sender)
{
if (rgUnlockType->ItemIndex == 0)
{
seExtension->Enabled = False;
seExtension->Value = 0;
lblExtensionLength->Enabled = False;
}
else
{
seExtension->Enabled = True;
lblExtensionLength->Enabled = True;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::seExtensionChange(TObject *Sender)
{
if (seExtension->Value == 0) rgUnlockType->ItemIndex = 0;
else rgUnlockType->ItemIndex = 1;
txtCodeOut->Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnGenerateKeyClick(TObject *Sender)
{
txtCodeOut->Text = GenerateKey(txtUserName->Text.c_str(), txtPrivateKey->Text.c_str(), seExtension->Value);
}
//---------------------------------------------------------------------------